<?php
/**
 * Zendex (Zend (Framework) Extensions)
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://zfx.netatoo.fr/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to support@netatoo.fr so we can send you a copy immediately.
 *
 * @category   Zendex
 * @package    Zendex_Bootstrap
 * @copyright  Copyright (c) 2007 Netatoo FR S.A.R.L. (http://www.netatoo.fr)
 * @license    http://Zendex.netatoo.fr/license/new-bsd     New BSD License
 */

/**
 * @category   Zendex
 * @package    Zendex_Bootstrap
 * @copyright  Copyright (c) 2007 Netatoo FR S.A.R.L. (http://www.netatoo.fr)
 * @license    http://Zendex.netatoo.fr/license/new-bsd     New BSD License
 */
abstract class Zendex_Bootstrap_Plugin_Abstract
{
    /**
     * @var SimpleXMLElement
     */
    protected $_xmlElement;

    /**
     * Set bootstrap xml document : is simply links to Zendex_Bootstrap
     *
     * @param string/SimpleXMLElement $xml
     * @return void
     */
    public function setXmlDocument($xml)
    {
        Zendex_Bootstrap::setXmlDocument($xml);
    }
    
    /**
     * Get bootstrap xml document : is simply links to Zendex_Bootstrap
     *
     * @return SimpleXMLElement
     */
    public function getXmlDocument()
    {
        return Zendex_Bootstrap::getXmlDocument();
    }
    
    /**
     * Set xml node
     *
     * @param SimpleXMLElement xml
     * @return Zend_Controller_Plugin_Abstract
     */
    public function setXmlElement(SimpleXMLElement $xml)
    {
        $this->_xmlElement = $xml;
        return $this;
    }

    /**
     * Get xml node
     *
     * @return SimpleXMLElement
     */
    public function getXmlElement()
    {
        return $this->_xmlElement;
    }

    /**
     * Called before Zendex_Bootstrap begins 
     * evaluating the xml callback methods.
     *
     * @param SimpleXMLElement $xml
     * @return void
     */
    public function launchStartup()
    {}
    
    /**
     * Called before Zendex_Bootstrap_Parser begins 
     * evaluating the xml callback methods.
     *
     * @param SimpleXMLElement $xml
     * @return void
     */
    public function dispatchLoopStartup(SimpleXMLElement $xml)
    {}

    /**
     * Called before Zendex_Bootstrap_Parser begins 
     * evaluating the xml callback methods.
     *
     * @param string $elemName
     * @param SimpleXMLElement $xml
     * @return void
     */
    public function preDispatchElement($elemName, SimpleXMLElement $xml)
    {}

    /**
     * Called before Zendex_Bootstrap_Parser begins 
     * evaluating the xml callback methods.
     *
     * @param string $elemName
     * @param SimpleXMLElement $xml
     * @return void
     */
    public function postDispatchElement($elemName, SimpleXMLElement $xml)
    {}

    /**
     * Called before Zendex_Bootstrap_Parser begins 
     * evaluating the xml callback methods.
     *
     * @param SimpleXMLElement $xml
     * @return void
     */
    public function dispatchLoopShutdown(SimpleXMLElement $xml)
    {}
}
